﻿<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="false"  CodeBehind="PageManage.aspx.cs" Inherits="eBlog.Web.Admin.PageManage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<link href="resources/css/style.css" rel="stylesheet" type="text/css" />
<script src="resources/scripts/common.js" type="text/javascript"></script>
<script src="resources/scripts/admincp.js" type="text/javascript"></script>
<link href="../Assets/Editors/kindeditor-4.0-beta/themes/default/default.css" rel="stylesheet" type="text/css" />
<script src="../Assets/Editors/kindeditor-4.0-beta/kindeditor-min.js" type="text/javascript"></script>
<script src="../Assets/Editors/kindeditor-4.0-beta/lang/zh_CN.js" type="text/javascript"></script>
<script type="text/javascript">
   KindEditor.ready(function (K) {
        var editor1 = K.create('#txtContent', {
            uploadJson: '/Assets/Editors/kindeditor-4.0-beta/plugins/filemanager/upload_json.ashx',
            fileManagerJson: '/Assets/Editors/kindeditor-4.0-beta/plugins/filemanager/file_manager_json.ashx',
            allowFileManager: true,
            afterCreate: function () {
                var self = this;
                K.ctrl(document, 13, function () {
                    self.sync();
                    K('form[name=addpostForm]')[0].submit();
                });
                K.ctrl(self.edit.doc, 13, function () {
                    self.sync();
                    K('form[name=addpostForm]')[0].submit();
                });
            }
        });
    });
</script>
</head>

<body>


<div id="append_parent"></div>
<div class="container" id="cpcontainer">
<script type="text/JavaScript">    parent.document.title = '管理中心 - 页面管理 '; if (parent.$('admincpnav')) parent.$('admincpnav').innerHTML = '页面&nbsp;&raquo;&nbsp;管理 页面管理';</script>

<div class="floattop">
<div class="itemtitle">
	<h3>页面管理</h3>
    <ul class="tab1" id="submenu">
        <li class="current"><a href="PageManage.aspx"><span>页面列表</span></a></li>
        <li class="current"><a href="PageManage.aspx?action=add"><span>新建页面</span></a></li>
    </ul>
</div>
</div>

<div class="floattopempty"></div>

<form name="cpform" id="cpform" runat="server">
<input type="hidden" name="anchor" value="" />
<input type="hidden" ID="Referrer" runat="server" />


<asp:Panel ID="edit" runat="server" Visible="false" EnableViewState="false">
<div class="tb tb2 nobdb" id="base">
	
	<p>标题:	
    <asp:TextBox ID="txtTitle" runat="server" class="txt" Width="30%"></asp:TextBox>
    </p>
    


	<p>内容:</p>
    <p>
	<asp:TextBox ID="txtContent" runat="server" mce_editable="true" class="txt" TextMode="MultiLine" Width="80%" Height="600px"></asp:TextBox>
	</p>
   
    
    <p>CodeName：</p>
    <p>
	<asp:TextBox ID="txtCodeName" runat="server" class="txt" Width="30%"></asp:TextBox>
    </p>
    <p>
        <asp:CheckBox ID="chkCommentStatus" Text="禁止评论" runat="server" Checked="False" CssClass="checkItem" />
    </p>
</div>
<div class="btnsaves">
<asp:Button ID="btnSave" runat="server" Text="保 存" class="btn" OnClick="btnSave_Click" ></asp:Button>
<span style="margin-left:20px">
</span><input type="button" value="返 回" id="goback" class="btn" onclick="javascript:history.go(-1)" /></div>
</asp:Panel>

<%--列表容器--%>
<asp:Panel ID="list" runat="server" Visible="false" EnableViewState="false">
<table class="tb tb2 ">
<tr><th colspan="15" class="partition">共<strong> <%=ListCount %> </strong>篇文章<a href="" class="act lightlink normal"></a></th></tr>

<tr class="header">
    <th></th>
	<th>序号</th>
	<th>标题</th>
    <th>CodeName</th>
    <th>允许评论</th>
	<th>创建时间</th>
	<th>管理选项</th>
</tr>

<asp:Repeater ID="RPLIST" runat="server">
<itemtemplate>
<tr class="hover">
	<td class="td25"><input type="checkbox" name="checkAllID" value="<%#Eval("ID") %>" class="checkbox"></td>
	<td><%#Eval("ID") %></td>
	<td><%#Eval("Title") %></td>
    <td><%#Eval("CodeName")%></td>
    <td><%#Eval("CommentStatus")%></td>
	<td><%#Eval("CreateDate") %></td>
	<td><a href="?action=show&id=<%#Eval("ID") %>" class="act">查看</a><a href="?action=edit&id=<%#Eval("ID") %>" class="act">编辑</a><a href="?action=del&id=<%#Eval("ID") %>" class="act" onclick="return confirm('数据删除不可恢复,确认删除吗？');" >删除</a></td>
</tr>
</itemtemplate>
</asp:Repeater>
<tr><td colspan="15"><div class="cuspages right"><div class="pg"><asp:Literal ID="PageNav" runat="server"></asp:Literal></div></div>
<div class="fixsel"><input type="checkbox" name="chkall" onclick="checkAll('prefix', this.form, 'checkAllID')" class="checkbox" />删? &nbsp;
<input type="button" class="btn" id="checkAllDel" name="checkAllDel" value="提交" onclick="return confirm('确认选择批量删除吗？');"/></div>
</td></tr>
</table>
</asp:Panel>

<%--AjaxPanel Show 单个内容展示层--%>
<asp:Panel ID="show" runat="server" Visible="false" EnableViewState="false">
<table class="cmlist" width="100%">
<% DBScript.IDBBase dal = DBScript.DBFactory.GetDbProvider(); eBlog.Entity.Posts model = dal.GetModel<eBlog.Entity.Posts>(id); %>
	<tr><th>ID</th> <td><%=model.ID %></td></tr>
	<tr><th>Title</th> <td><%=model.Title %></td></tr>
	<tr><th>Content</th> <td><%=model.Content %></td></tr>
	<tr><th>CommentStatus</th> <td><%=model.CommentStatus %></td></tr>
	<tr><th>CommentCount</th> <td><%=model.CommentCount %></td></tr>
	<tr><th>CreateDate</th> <td><%=model.CreateDate %></td></tr>
	<tr><th>UpdateDate</th> <td><%=model.UpdateDate %></td></tr>
</table>
</asp:Panel>
<script src="resources/scripts/calendar.js" type="text/javascript"></script>
<input type="hidden" ID="ErrCodeStr" runat="server" />
<script type="text/javascript">formShowErr("ErrCodeStr");</script>
</form>
</div>
</body>
</html>
